package cc.lj.internal.coupons.interfaces.dto.command;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Future;
import java.time.LocalDate;

@Data
@Validated
public class MartCapAddCommand {

    @ApiModelProperty(value = "开始日期")
    @Future(message = "开始日期必须是未来的日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
    private LocalDate startDate;

    @ApiModelProperty(value = "截止日期")
    @Future(message = "截止日期必须是个未来的日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate endDate;
}
